package kr.hkit.powerjava.chapter07;

import java.util.Scanner;
/* PROGRAMMING 05 문자열 입력받아 거꾸로 출력 */
class Reverse{
 String word;

 void printWord(){
  System.out.print("문자를 입력하세요 : ");
  Scanner sc = new Scanner(System.in);
  word = sc.next();
	  for(int i = word.length()-1; i >= 0; i--){     //012345..
	   System.out.print(word.charAt(i));
  }
 }

}// end of Reverse Class

public class ReverseTest {
 public static void main(String[] args) {
  Reverse r1 = new Reverse();
  r1.printWord(); 
  
/*  String str1 = "mana";
  System.out.println(str1.length());  4*/ 
 } 
}// end of ReverseTest Class 
